/*
 *说明：选择IP策略脚本
 *
 *@author liuxun 2012-03-25
*/

var opeForm;

$(function() {
	opeForm = $('#opeForm');
	$('#okBtn').click(doOk);
});


function doOk() {
	var policy_grp_id = $('#policy_grp_id').val();
	var rows = list.getRows();
	var params = '';
	
	if (rows.length > 0) {
		var ids = [];
		for(var i=0;i<rows.length;i++){
			ids.push(rows[i][0]);
		}
		params = $ .param({'id' : ids}, true);
	}

	showSystemProccessing();
	$.ajax({
		url: 'D_POLICYGRP_POLICY!doInsertSelectedTimePolicy.do?model.policy_grp_id=' + policy_grp_id,
		data: params,
		type: 'post',
		success: function(data){
			removeSystemProccessing();
			showInfoWin("操作成功！");
		}
	});
}